﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PMS.ENT;
using PMS.DAL;

namespace PMS.BLL
{
    public class CommentBLL
    {
        #region Get
        public static CommentENT GetCommentByID(int commentID)
        {
            try
            {
                return CommentDAL.GetCommentByID(commentID);
            }
            catch (Exception)
            {
                throw;
            }
        }

        public static CommentCollection GetCommentList(string commentName, int projectID, int scheduleID, int userID, string status, string orderBy, string orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                return CommentDAL.GetCommentList(commentName, projectID, scheduleID, userID, status, orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception)
            {
                throw;
            }
        }

       

        public static CommentCollection GetCommentListByStatementID(int statementID)
        {
            try
            {
                return CommentDAL.GetCommentListByStatementID(statementID);
            }
            catch (Exception)
            {
                throw;
            }
        }

        #endregion

        #region Insert Update Delete Confirm

        public static int InsertComment(CommentENT comment)
        {
            try
            {
                return CommentDAL.InsertComment(comment);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int UpdateComment(CommentENT comment)
        {
            try
            {
                return CommentDAL.UpdateComment(comment);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int DeleteComment(string commentID, int userID)
        {
            try
            {
                return CommentDAL.DeleteComment(commentID, userID);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int ConfirmComment(string commentID, int userID)
        {
            try
            {
                return CommentDAL.ConfirmComment(commentID, userID);
            }
            catch (Exception)
            {

                throw;
            }
        }


        #endregion


    }
}
